﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Collectable : Interactable
{
    public Objectinfo Obj_Info;

    // Start is called before the first frame update
    void Start()
    {
        Set_Object_Byid(3002);
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    // 可以收集的物品要删除
    public override void Activate()
    {
        base.Activate();
        Inventory._instance.Add_Concrete_Item(Obj_Info);

        Destroy(gameObject);
    }

    public void Set_Object_Byid(int id)
    {
        this.Obj_Info = ObjectsInfo._instance.getObjectinfobyid(id);
    }

    public void Set_Object_Item(Objectinfo info)
    {
        this.Obj_Info = info;
    }
}
